package com.yeziji.dataCenter.common;

import com.yeziji.common.CommonSymbol;

/**
 * 数据中心键值
 *
 * @author hwy
 * @since 2024/10/25 14:37
 **/
public interface DataCenterKey {
    /**
     * 统一前缀
     */
    String COMMON_PREFIX = "yzj-data-center";

    /**
     * redis 统一前缀
     */
    String COMMON_REDIS_PREFIX = COMMON_PREFIX + CommonSymbol.COLON;

    /**
     * 通用 key
     */
    interface Key {
        /**
         * 死信队列 交换机标识符
         */
        String DEAD_LETTER_EXCHANGE_KEY = "x-dead-letter-exchange";
        /**
         * 死信队列交换机绑定键标识符
         */
        String DEAD_LETTER_ROUTING_KEY = "x-dead-letter-routing-key";
    }

    /**
     * redis key
     */
    interface Redis {
        /**
         * 统一 redis 前缀
         */
        String MODULES_COMMON_REDIS_PREFIX = COMMON_REDIS_PREFIX + COMMON_PREFIX + CommonSymbol.COLON;
        /**
         * 获取最大 id 记录锁
         */
        String GET_MAX_ID_RECORD_LOCK = MODULES_COMMON_REDIS_PREFIX + "max_id_type:";
        /**
         * 更新最大 id 锁
         */
        String GET_MAX_ID_UPDATE_LOCK = MODULES_COMMON_REDIS_PREFIX + "max_id_type:update:";
        /**
         * rabbit 死信队列 reason
         */
        String DEAD_REASON = MODULES_COMMON_REDIS_PREFIX + "dead_reason:";
    }

    /**
     * rabbit mq 主题前缀
     */
    interface Topic {
        /**
         * 死信队列
         */
        String DEAD_LETTER = "dead.letter.";
        /**
         * 平台数据操作主题
         */
        String PLATFORM_DB_OPERATE = "platform.db.operate.";
    }
}